package com.itheima.service02;

import com.itheima.domain.Student;
import com.itheima.mapper02.StudentMapper02;
import com.itheima.utils.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class TestDemo02 {

    @Test
    public void findAll (){
        SqlSession sqlSession = MyBatisUtils.getSqlSession();
        StudentMapper02 mapper = sqlSession.getMapper(StudentMapper02.class);
        List<Student> all = mapper.findAll();
        for (Student student : all) {
            System.out.println(student);
        }


    }
}
